package com.zxp.springcloud.controller;

import com.zxp.springcloud.service.PaymentHystrixService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description:
 * @author: 张新朋
 * @time: 2020/5/6 14:10
 */
@RestController
@Slf4j
public class OrderHystrixController
{
    @Resource
    private PaymentHystrixService paymentHystrixService;

    @GetMapping("/consumer/paymemt/hystrix/ok/{id}")
    public String get_OK(@PathVariable("id") Integer id){
        return paymentHystrixService.get_OK(id);
    }

    @GetMapping("/consumer/paymemt/hystrix/error/{id}")
    public String get_ERROR(@PathVariable("id") Integer id){
        return paymentHystrixService.get_ERROR(id);
    }
}